<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="content-style-type" content="text/css"/>
<meta http-equiv="content-script-type" content="text/javascript"/>
<meta name="version" content="neblog-1.0"/>
<title>hikerwu</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/tool.js"></script>
<style>
    .dataout { width:100%; height:660px;overflow-x:scroll;}
    .odd {background-color: #ffd; }
    .even {background-color: #ddf; }
    .over {background-color: #FFEC8B; } 
</style>
</head>
<body>

<div>
    <p><select id="s_ch">
        <option value="">请选择</option>
        <option value="news_news_top">要文</option>
        <option value="news_news_finance_yaowen">财经</option>
        <option value="news_news_ent">娱乐</option>
        <option value="news_news_sports">体育</option>
        <option value="news_news_tech">科技</option>
        <option value="news_news_mil">军事</option>
        <option value="news_news_digi">数码</option>
        <option value="news_news_lad">时尚</option>
        <option value="news_news_auto">汽车</option>
        <option value="news_news_house">房产</option>
        <option value="news_news_game">游戏</option>
        <option value="news_news_astro">星座</option>
        <option value="news_news_gd">广东</option>
        <option value="news_photo">图片</option>
        <option value="news_video">视频</option>
        <option value="news_news_wx">微信</option>
        <option value="news_topic">话题</option>
        <option value="news_hotweibo">微博热议</option>
    </select>&nbsp;<button id="b_up">update</button></p>
    <div>
        <!--{if $out.ids}--><table>
            <!--{section name=t loop=$out.ids}-->
            <div>
            <tr id="l_li" class="<!--{if $smarty.section.t.index %2 == 0}-->odd<!--{else}-->even<!--{/if}-->">
                <td width="400px"><span title="<!--{$out.ids[t].id}-->"><!--{$smarty.section.t.index}-->,<!--{$out.ids[t].title}--></span></td>
                <td width="250px"><!--{$out.ids[t].id}--><input type="checkbox"/>,<!--{$out.ids[t].comments}--></td>
                <td><span title="<!--{$out.ids[t].id}-->">
                <button id="b_url">url</button>
                <button id="b_curl">curl</button>
                <button id="b_turl">turl</button>
                <button id="b_opendetail">detail</button>
                <button id="b_openwebsite">site</button>
                <button id="b_openweibo">site&weibo</button>
                <button id="b_cmntslist">l</button>
                <button id="b_content" onclick="window.open('/hiker/?m=ArticleIds&a=getContent&id=<!--{$out.ids[t].id}-->','_blank');">c</button>                
                <button onclick="window.open('/hiker/?m=ArticleUrl&id=<!--{$out.ids[t].id}-->','_blank');">urls</button>                
                </span></td></tr>
            </div>
            <!--{/section}--></table>
        <!--{/if}-->
    </div>
</div>
<script type="text/javascript">

$("#s_ch").val("<!--{$out.chlid}-->");
$().ready(function(){  
    $("[id='l_li']").mouseover(function(){
        $(this).addClass("over");
    }).mouseout(function(){
        $(this).removeClass("over");
    }).click(function(){
        $("input[type='checkbox']", this).attr("checked", true );
    }).dblclick(function(){
        if( $(this).attr( "bselect" ) == 1 ){
            $(this).css( "background-color", "green" );
            $(this).attr( "bselect", 0 );
        } else {
            $(this).css( "background-color", "white" );
            $(this).attr( "bselect", 1 );
        }
    }); 
    $("[id='b_url']").click(function(){
        var aid = $(this).parent().attr("title");
        window.open("http://view.inews.qq.com/a/"+aid,'_blank');
    });
    $("[id='b_curl']").click(function(){
        var aid = $(this).parent().attr("title");
		var data = {};
        data['id'] = aid;
        var url = '/hiker/?m=ArticleIds&a=getUrl';
        getUrlAndDo( data, url, function( result ){
			var urls = "http://tcomment.tech.qq.com/rend/rend/rending?url="+result['data'];
			window.open(urls,'_blank');
		});
    });
    $("[id='b_turl']").click(function(){
        var aid = $(this).parent().attr("title");
		var data = {};
        data['id'] = aid;
        var url = '/hiker/?m=ArticleIds&a=getTUrl';
        getUrlAndDo( data, url, function( result ) {
			window.open(result['data'],'_blank');
		});
    });
    $("[id='b_opendetail']").click(function(){
        var aid = $(this).parent().attr("title");
        var data = {ids:aid};
        var url = '/hiker/?m=ArticleIds&a=getNews';
        getUrlAndDo( data, url, function( result ) {
            myWindow=window.open('','','width=1000,height=1200');
            myWindow.document.write(result['data']);
            myWindow.focus();
        });
    });
    $("[id='b_openwebsite']").click(function(){
        var aid = $(this).parent().attr("title");
        var data = {id:aid};
        var url = '/hiker/?m=ArticleIds&a=getWebCmntUrl';
        getUrlAndDo( data, url, function( result ) {
            window.open(result['data'],'_blank');
        });
    });
    $("[id='b_cmntslist']").click(function(){
        var aid = $(this).parent().attr("title");
        var url = '/hiker/?m=ArticleIds&a=getCmntsList&id='+aid;
        window.open(url,'_blank');
    });
    $("[id='b_openweibo']").click(function(){
        var aid = $(this).parent().attr("title");
        var data = {id:aid};
        var url = '/hiker/?m=ArticleIds&a=getWeiboCmntUrl';
        getUrlAndDo( data, url, function( result ) {
            window.open(result['data'],'_blank');
        });
    });
    $("#s_ch").change(function(){
        $(this).attr("disabled", true );
        $("#b_up").attr("disabled", true );
        window.location.href = "?m=ArticleIds&a=display&chlid="+this.value;
    });
    $("#b_up").click(function(){
        $("#s_ch").change();
    });
});

</script>

</body>
</html>
